home *** CD-ROM | disk | FTP | other *** search
/ By Popular Request 2.0 / By Popular Request 2.0 (Arsenal Computer).ISO / amiga_1 / atcpsd40.lha / AmiTCP-4.0-gcc / netinclude / devices / sana2.i < prev    next >
Text File  |  1995-04-07  |  8KB  |  243 lines

  1.         IFND    SANA2_SANA2DEVICE_I
  2. SANA2_SANA2DEVICE_I     SET     1
  3. **
  4. **      $Filename: devices/sana2.i $
  5. **      $Revision: 1.16 $
  6. **      $Date: 94/02/17 14:28:38 $
  7. **
  8. **      Structure definitions for SANA-II devices.
  9. **
  10. **      (C) Copyright 1991 Commodore-Amiga Inc.
  11. **              All Rights Reserved
  12. **
  13.  
  14.  
  15.         IFND    EXEC_TYPES_I
  16.         INCLUDE "exec/types.i"
  17.         ENDC
  18.  
  19.         IFND    EXEC_PORTS_I
  20.         INCLUDE "exec/ports.i"
  21.         ENDC
  22.  
  23.         IFND    EXEC_IO_I
  24.         INCLUDE "exec/io.i"
  25.         ENDC
  26.  
  27.         IFND    EXEC_ERRORS_I
  28.         INCLUDE "exec/errors.i"
  29.         ENDC
  30.  
  31.         IFND    DEVICES_TIMER_I
  32.         INCLUDE "devices/timer.i"
  33.         ENDC
  34.  
  35.         IFND    UTILITY_TAGITEM_I
  36.         INCLUDE "utility/tagitem.i"
  37.         ENDC
  38.  
  39.  
  40. SANA2_MAX_ADDR_BITS     EQU     128
  41. SANA2_MAX_ADDR_BYTES    EQU     ((SANA2_MAX_ADDR_BITS+7)/8)
  42.  
  43.  
  44.  STRUCTURE IOSana2Req,0
  45.         STRUCT  IOS2_REQ,IO_SIZE
  46.         ULONG   IOS2_WIREERROR          ; wire type specific error
  47.         ULONG   IOS2_PACKETTYPE         ; packet type
  48.         STRUCT  IOS2_SRCADDR,SANA2_MAX_ADDR_BYTES       ; source address
  49.         STRUCT  IOS2_DSTADDR,SANA2_MAX_ADDR_BYTES       ; dest address
  50.         ULONG   IOS2_DATALENGTH         ; length of packet data
  51.         APTR    IOS2_DATA               ; packet data (not touched by driver!)
  52.         APTR    IOS2_STATDATA           ; statistics data pointer
  53.         APTR    IOS2_BUFFERMANAGEMENT   ; see SANA-II OpenDevice adoc
  54.  
  55.         LABEL   IOS2_SIZE
  56.  
  57.  
  58. ;
  59. ; equates for the IO_FLAGS field
  60. ;
  61.  
  62. SANA2IOB_RAW    EQU     7               ; raw packet IO requested
  63. SANA2IOF_RAW    EQU     (1<<SANA2IOB_RAW)
  64.  
  65. SANA2IOB_BCAST  EQU     6               ; broadcast packet (received)
  66. SANA2IOF_BCAST  EQU     (1<<SANA2IOB_BCAST)
  67.  
  68. SANA2IOB_MCAST  EQU     5               ; multicast packet (received)
  69. SANA2IOF_MCAST  EQU     (1<<SANA2IOB_MCAST)
  70.  
  71. SANA2IOB_QUICK  EQU     IOB_QUICK       ; quick IO requested (0)
  72. SANA2IOF_QUICK  EQU     IOF_QUICK
  73.  
  74.  
  75. ;
  76. ; equates for OpenDevice()
  77. ;
  78.  
  79. SANA2OPB_MINE   EQU     0               ; exclusive access requested
  80. SANA2OPF_MINE   EQU     (1<<SANA2OPB_MINE)
  81.  
  82. SANA2OPB_PROM   EQU     1               ; promiscuous mode requested
  83. SANA2OPF_PROM   EQU     (1<<SANA2OPB_PROM)
  84.  
  85. S2_Dummy        EQU     (TAG_USER+$B0000)
  86. S2_COPYTOBUFF   EQU     S2_Dummy+1
  87. S2_COPYFROMBUFF EQU     S2_Dummy+2
  88. S2_PACKETFILTER EQU     S2_Dummy+3
  89.  
  90.  STRUCTURE SANA2DEVICEQUERY,0
  91.         ; Standard information
  92.         ULONG   S2DQ_SIZEAVAILABLE      ; bytes available
  93.         ULONG   S2DQ_SIZESUPPLIED       ; bytes supplied
  94.         ULONG    S2DQ_FORMAT             ; this is type 0
  95.         ULONG    S2DQ_DEVICELEVEL        ; this document is level 0
  96.  
  97.         ; Common information
  98.         UWORD   S2DQ_ADDRFIELDSIZE           ; address size in bits
  99.         ULONG   S2DQ_MTU                ; maximum packet data size
  100.         ULONG    S2DQ_BPS                ; line rate (bits/sec)
  101.         ULONG    S2DQ_HARDWARETYPE       ; what the wire is
  102.  
  103.         ; Format specific information
  104.         LABEL   S2DQ_SIZE
  105.  
  106.  
  107. ;
  108. ; defined SANA-II hardware types
  109. ;
  110.  
  111. S2WIRETYPE_ETHERNET             EQU     1
  112. S2WIRETYPE_IEEE802              EQU     6
  113. S2WIRETYPE_ARCNET               EQU     7
  114. S2WIRETYPE_LOCALTALK            EQU     11
  115. S2WIRETYPE_DYLAN                EQU     12
  116.  
  117. S2WIRETYPE_AMOKNET              EQU     200
  118.  
  119. S2WIRETYPE_LIANA        EQU    202
  120.  
  121. S2WIRETYPE_PPP                  EQU     253
  122. S2WIRETYPE_SLIP                 EQU     254
  123. S2WIRETYPE_CSLIP                EQU     255
  124.  
  125. S2WIRETYPE_PLIP            EQU    420
  126.  
  127.  STRUCTURE SANA2PACKETTYPESTATS,0
  128.         ULONG    S2PTS_TXPACKETS         ; transmitted count
  129.         ULONG    S2PTS_RXPACKETS         ; received count
  130.         ULONG    S2PTS_TXBYTES           ; bytes transmitted count
  131.         ULONG    S2PTS_RXBYTES           ; bytes received count
  132.         ULONG    S2PTS_PACKETSDROPPED    ; packets dropped count
  133.         LABEL   S2PTS_SIZE
  134.  
  135.  
  136.  STRUCTURE SANA2SPECIALSTATRECORD,0
  137.         ULONG   S2SSR_TYPE              ; statistic identifier
  138.         ULONG    S2SSR_COUNT             ; the statistic
  139.         APTR    S2SSR_STRING            ; statistic name
  140.         LABEL   S2SSR_SIZE
  141.  
  142.  
  143.  STRUCTURE SANA2SPECIALSTATHEADER,0
  144.         ULONG   S2SSH_RECORDCOUNTMAX            ; room available
  145.         ULONG   S2SSH_RECORDCOUNTSUPPLIED       ; number supplied
  146.         LABEL   S2SSH_SIZE
  147.  
  148.  
  149.  STRUCTURE SANA2DEVICESTATS,0
  150.         ULONG    S2DS_PACKETSRECEIVED           ; received count
  151.         ULONG    S2DS_PACKETSSENT               ; transmitted count
  152.         ULONG    S2DS_BADDATA                   ; bad packets received
  153.         ULONG    S2DS_OVERRUNS                  ; hardware miss count
  154.         ULONG    S2DS_UNUSED                    ; currently unused field
  155.         ULONG    S2DS_UNKNOWNTYPESRECEIVED      ; orphan count
  156.         ULONG    S2DS_RECONFIGURATIONS          ; network reconfigurations
  157.         STRUCT  S2DS_LASTSTART,TV_SIZE          ; time of last online
  158.         LABEL   S2DS_SIZE
  159.  
  160.  
  161. ;
  162. ; Device Commands
  163. ;
  164.  
  165. S2_START                EQU     (CMD_NONSTD)
  166.  
  167. S2_DEVICEQUERY          EQU     (S2_START+0)
  168. S2_GETSTATIONADDRESS    EQU     (S2_START+1)
  169. S2_CONFIGINTERFACE      EQU     (S2_START+2)
  170. S2_ADDMULTICASTADDRESS  EQU     (S2_START+5)
  171. S2_DELMULTICASTADDRESS  EQU     (S2_START+6)
  172. S2_MULTICAST            EQU     (S2_START+7)
  173. S2_BROADCAST            EQU     (S2_START+8)
  174. S2_TRACKTYPE            EQU     (S2_START+9)
  175. S2_UNTRACKTYPE          EQU     (S2_START+10)
  176. S2_GETTYPESTATS         EQU     (S2_START+11)
  177. S2_GETSPECIALSTATS      EQU     (S2_START+12)
  178. S2_GETGLOBALSTATS       EQU     (S2_START+13)
  179. S2_ONEVENT              EQU     (S2_START+14)
  180. S2_READORPHAN           EQU     (S2_START+15)
  181. S2_ONLINE               EQU     (S2_START+16)
  182. S2_OFFLINE              EQU     (S2_START+17)
  183.  
  184. S2_END                  EQU     (S2_START+18)
  185.  
  186.  
  187. ;
  188. ; defined errors for IO_ERROR
  189. ;
  190.  
  191. S2ERR_NO_ERROR          EQU     0       ; peachy-keen
  192. S2ERR_NO_RESOURCES      EQU     1       ; resource allocation failure
  193. S2ERR_BAD_ARGUMENT      EQU     3       ; garbage somewhere
  194. S2ERR_BAD_STATE         EQU     4       ; inappropriate state
  195. S2ERR_BAD_ADDRESS       EQU     5       ; who?
  196. S2ERR_MTU_EXCEEDED      EQU     6       ; too much to chew
  197. S2ERR_NOT_SUPPORTED     EQU     8       ; command not supported by hardware
  198. S2ERR_SOFTWARE          EQU     9       ; software error detected
  199. S2ERR_OUTOFSERVICE      EQU     10      ; driver is offline
  200. S2ERR_TX_FAILURE        EQU     11      ; transmission attempt failed
  201. ;SEE ALSO <exec/errors.i>
  202.  
  203. ;
  204. ; defined errors for IOS2_WIREERROR
  205. ;
  206.  
  207. S2WERR_GENERIC_ERROR    EQU     0       ; no specific info available
  208. S2WERR_NOT_CONFIGURED   EQU     1       ; unit not configured
  209. S2WERR_UNIT_ONLINE      EQU     2       ; unit is currently online
  210. S2WERR_UNIT_OFFLINE     EQU     3       ; unit is currently offline
  211. S2WERR_ALREADY_TRACKED  EQU     4       ; protocol already tracked
  212. S2WERR_NOT_TRACKED      EQU     5       ; protocol not tracked
  213. S2WERR_BUFF_ERROR       EQU     6       ; buffer mgmt func returned error
  214. S2WERR_SRC_ADDRESS      EQU     7       ; source address problem
  215. S2WERR_DST_ADDRESS      EQU     8       ; destination address problem
  216. S2WERR_BAD_BROADCAST    EQU     9       ; broadcast address problem
  217. S2WERR_BAD_MULTICAST    EQU     10      ; multicast address problem
  218. S2WERR_MULTICAST_FULL   EQU     11      ; multicast address list full
  219. S2WERR_BAD_EVENT        EQU     12      ; unsupported event class
  220. S2WERR_BAD_STATDATA     EQU     13      ; statdata failed sanity check
  221. S2WERR_IS_CONFIGURED    EQU     15      ; attempt to config twice
  222. S2WERR_NULL_POINTER     EQU     16      ; null pointer detected
  223. S2WERR_TOO_MANY_RETRIES EQU     17      ; tx failed due to too many retries
  224. S2WERR_RCVREL_HDW_ERR   EQU     18      ; driver fixable hdw error
  225.  
  226.  
  227. ;
  228. ; defined events
  229. ;
  230.  
  231. S2EVENT_ERROR       equ 1      ; error catch all
  232. S2EVENT_TX          equ 2      ; transmitter error catch all
  233. S2EVENT_RX          equ 4      ; receiver error catch all
  234. S2EVENT_ONLINE      equ 8      ; unit is in service
  235. S2EVENT_OFFLINE     equ 16     ; unit is not in service
  236. S2EVENT_BUFF        equ 32     ; buffer mgmt function error catch all
  237. S2EVENT_HARDWARE    equ 64     ; hardware error catch all
  238. S2EVENT_SOFTWARE    equ 128    ; software error catch all
  239.  
  240.  
  241.         ENDC    SANA2_SANA2DEVICE_I
  242.  
  243.